package com.example.demo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/test")
public class TestDemo {

    //Logger建议用slf4j
    Logger log = LoggerFactory.getLogger(getClass());
    @GetMapping("/getStr")
    public String getStr(){
        log.debug("debug ****************************");
        log.info("info ****************************");
        log.warn("warn ****************************");
        log.error("error ****************************");

        return  "hello word";
    }
}
